package com.ruoyi.web.domain;

import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.io.Serializable;

public class EndProcessEntity implements Serializable {
    private static final long serialVersionUID = 1L;
    private String Device;
    private String ProcessStatus;

    public void setDevice(String Device) {
        this.Device = Device;
    }

    @JsonProperty("Device")
    public String getDevice() {
        return this.Device;
    }

    public void setProcessStatus(String ProcessStatus) {
        this.ProcessStatus = ProcessStatus;
    }

    @JsonProperty("ProcessStatus")
    public String getProcessStatus() {
        return this.ProcessStatus;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
                .append("Device", getDevice())
                .append("ProcessStatus", getProcessStatus())
                .toString();
    }

    public JSONObject toJson() {
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("Device", this.Device);
        jsonObject.put("ProcessStatus", this.ProcessStatus);
        return jsonObject;
    }

    public Boolean isFull() {
        return this.Device != null & this.ProcessStatus != null;
    }

    public static EndProcessEntity example() {
        EndProcessEntity entity = new EndProcessEntity();
        entity.setDevice("DRILL");
        entity.setProcessStatus("Done");
        return entity;
    }
}
